// -----------------------------------------------------------------------
//  <copyright file="IResourceExtractor.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2024 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2024-03-06 10:47</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Authorization;

/// <summary>
/// 定义资源信息提取器
/// </summary>
public interface IResourceExtractor
{
    /// <summary>
    /// 获取 资源类型
    /// </summary>
    ResourceType ResourceType { get; }

    /// <summary>
    /// 提取资源信息
    /// </summary>
    /// <param name="serviceName">服务名称</param>
    /// <returns></returns>
    Task<IResource[]> ExtractAsync(string serviceName);
}
